function writeFlash( src, id, flashvars ){	
	var objStr = "<div id='wrap' style='width:100%;height:100%;'>";
	if( id == null ){
		id= "flash"
	}
	if(navigator.userAgent.indexOf("MSIE")<0){
		objStr += "<object id='" + id + "' type='application/x-shockwave-flash' data='" + src + "'>";
	}else{
		objStr += "<object id='" + id + "' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'>";
		objStr += "<param name='movie' value='" + src + "' />";
	}
	objStr += "<param name='allowFullScreen' value='true' />";
	objStr += "<param name='wmode' value='window' />";
	objStr += "<param name='flashvars' value='" + flashvars + "' />";
	objStr += "</object>";
	objStr += "</div>";
	document.write(objStr);
}

function setMinSize(minWidth,minHeight){
	var ua=navigator.userAgent;
	var tmp=ua.split("MSIE");
	var wrap = document.getElementById("wrap");
	var flash = wrap.getElementsByTagName("object")[0];

	if(tmp.length>1&&parseInt(tmp[1])<7){
		window.onresize=function(){
			if(document.body.clientWidth<=minWidth){
				wrap.style.width=minWidth+"px";
			}else{
				wrap.style.width="100%";
			}
			if(document.body.clientHeight<=minHeight){
				wrap.style.height=minHeight+"px";
			}else{
				wrap.style.height="100%";
			}
		}
		window.onresize();
	}else{
		wrap.style.minWidth=minWidth+"px";
		wrap.style.minHeight=minHeight+"px";
		flash.style.minWidth=minWidth+"px";
		flash.style.minHeight=minHeight+"px";
		//alert("aaaa");
	}
}